package com.dp.service;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.dp.pojo.News;
import com.dp.util.DataMap;
import com.dp.vo.NewsQuestion;
import com.dp.vo.NewsResources;

@SuppressWarnings("unchecked")
public interface NewsService {

	public List findNewsAll(News news);
	
	public int getNewsAllTotal(News news);

	public List findNewsAllbyname(Map name);

	public int findNewsCount();

	public int findNewsCountbyname(Map name);

	public List findNewsbyType(String type);

	public News findNewsbyid(String id);

//	public void deleteNews(String id);

	public void addNews(News News);
	//add for unpass news
	public boolean unpassNews(News News);
	public boolean udpateAuditNews(News News);

	public boolean udpateTestNews(News News);

	public void enableNews(News News);

	public void updateNews(News news);

	public void addNewsResource(NewsResources newsResources,News news);

	public News checkNewsName(Map newsName);
	
	List search(News news,String contentnamepage,String contentstatuspage,int teststatuspage,String searchChid);
	int searchCount(News news,String contentnamepage,String contentstatuspage,int teststatuspage,String searchChid);
	
	public ArrayList findResourceByNews(String newsid);
	
	public ArrayList findAllLastChannel(Object roleId,String userId);	
	public ArrayList findSelectChannelsById(String newsId);	
	public ArrayList findNotChooseChannel(String newsId,Object roleId,String userId);	
	public String getSpcodeByUserId(String userid);	
	public String getExistFilename(String cid);	
	public String addNewsModify(News news);
	public boolean updateNewsModify(News news,String deleteResUrls);
	public boolean disableNews(News news);
	
	public List getChannelsbyNews(String contentid);
	public boolean deleteContentRrsource(String url);
	public boolean deleteNews(News news);
	//add 1202 sub audit
	public boolean subAuditNews(News News);
	//add 1208 for get resources size at list and detail page
	public int getResSize(String contentid);
	public List findNewsAllModify(News news);
	public List searchModify(News news,String contentnamepage,String contentstatuspage,int teststatuspage,String searchChid);
	public List findPollsByContentid(DataMap dataMap, Integer firstrow,
			Integer maxrow);
	public Object get(Class class1, Serializable id);

	public List getNewsQuestionAnswerListByNqid(
			NewsQuestion newsQuestion);

	public boolean updatePollsByContentid(DataMap hashMap);

	public boolean pollsortItems(DataMap hashMap, String gvalue);

	public boolean addPollToNews(DataMap dataMap);

	public boolean updateNewsContenttitle_htmlToUrl(News news);
	//add 0325 get content attachment file size with cid
	public String findAtchSizeWithCid(Integer cid);

	public String getChannleidsByCid(String cid);

	public boolean addNewscomment(DataMap dataMap);
}
